<template>
    <div class="bottm-bar">
        <div class="bar-item bar-left">
            <div>
                <i class="icon service"></i>
                <span class="text">客服</span>
            </div>
            <div>
                <i class="icon shop"></i>
                 <span class="text">店铺</span>
            </div>
             <div>
                <i class="icon select"></i>
                <span class="text">收藏</span>
            </div>
        </div>
        <div class="bar-item bar-right">
            <div class="bar-cart" @click="addToCart">加入购物车</div>
            <div class="bar-buy">立即购买</div>
        </div>
        <!-- <sport-hall ref="ball" class="sport-ball"></sport-hall> -->
    </div>
</template>

<script>
export default {
    name: 'DetailBottomBar',
    methods: {
        // 添加购物车监听
        addToCart() {
          this.$emit("addCart")
        }
    }
}
</script>

<style>
 .bottm-bar{
    height: 50px;
    background-color: #fff;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* position: relative; */
    display: flex;
    text-align: center;
    z-index: 99;
 }
 .bottm-bar .bar-item{
    flex: 1;
    display: flex;
 }
 .bottm-bar .bar-item>div{
    flex: 1;
 }
 .bottm-bar .bar-item .text{
    font-size: 13px;
 }
 .bottm-bar .bar-left .icon{
    display: block;
    width: 22px;
    height: 22px;
    margin: 5px auto 0;
    background-size: 22px 22px;   
    background-repeat:no-repeat;
 }
 .bottm-bar .bar-left .service {
    background-image: url('~assets/images/detail-bottomBar/kefu.png');
 }
 .bottm-bar .bar-left .shop {
     background-image: url('~assets/images/detail-bottomBar/dianpu.png');
 }
 .bottm-bar .bar-left .select {
     background-image: url('~assets/images/detail-bottomBar/shoucang.png');
 }
.bottm-bar .bar-right{
    box-sizing: border-box;
    align-items: center;
    line-height: 34px;
}
.bottm-bar .bar-right .bar-cart,
.bottm-bar .bar-right .bar-buy{
    padding: 8px 0;
    color: #fff;
    font-size: 15px;
}
.bar-cart{
    background-color: #FF9500;
}
.bar-buy{
    background-color: #FF0036;
}
</style>